This chapter describes movie controller components. Movie controllers provide a user interface for playing and editing movies, eliminating much of the complexity of working with movies. Movie controllers are implemented in QuickTime as components. This allows customized controllers to be plugged in to QuickTime for use by your application.
If you are developing an applcation that can play movies, consider using a movie controller component to simplify your task. You should already be familiar with QuickTime movies and the concept of components before reading this chapter.
If you are developing a movie controller component, information listed in this chapter will describe the interface that your component must support. In addition, you should be familiar with the material in the chapter "Component Manager."
About Movie Controller ComponentsInside Macintosh describes the capabilities of movie controller components in general and discusses the movie controller component supplied by Apple. Most developers will want to be familiar with this material. The topics discussed include:
Spatial PropertiesInside Macintosh discusses the display regions that are supported by movie controller components: boundary regions, boundary rectangles, and clipping regions. Your application can manipulate these regions to determine how the controller is displayed. If your application will use a controller component to display movies, you will want to read this section.
Playing MoviesInside Macintosh provides sample code showing how to use the standard movie controller component to play a movie. Code is included for opening a movie file selection dialog, opening the selected movie file, and playing the movie.
Customizing Movie ControllersInside Macintosh describes how to customize an existing movie controller by adding an action filter function to your application. An action filter function is called by the movie controller component, allowing your application to react to movie controller events. Sample code is provided for an action filter function that resizes the window whenever the user hides the controller.
Changing the Shape of the CursorQuickTime 4 Reference describes the issues that need to be considered when changing the shape of the cursor within an application that contains a movie controller component. For example, the movie controller component may change the cursor shape when the cursor is within the controller's boundary region, and this can conflict with a cursor-shape change specified by the application.
Adding a Custom Button
QuickTime 4 Reference describes how your application can request a custom button in a movie controller by setting the mcFlagsUseCustomButton flag in the movie controller flags. The appearance of this button is determined by the movie controller.
Inside Macintosh lists all of the actions that can be requested of a movie controller component. Included are the actions used by applications, such as activating a movie or setting the audio volume, and actions recieved by action filter functions, which allow you to pre-empt the actions of a movie controller with your own functions. Over thirty actions are defined. QuickTime 4 Reference adds seven new actions to the list:
Inside Macintosh defines the functions used to associate a controller with a movie. Most developers will use these functions.
Managing Controller AttributesInside Macintosh defines the functions that are used to set and read the controller's attributes, such as whether the controller is visible, or whether the controller is attached to the movie. Most developers will use these functions.
Inside Macintosh defines the functions your application must call when an event occurs that might require action by the movie controller. A code sample is included, showing an event loop that routes events to the movie controller first, then acts on events that the movie controller has not handled. QuickTime 4 Reference adds a function for determining whether a point is within a movie controller, and documents a new flag that can be returned by the MCGetControllerInfo function.
Inside Macintosh defines the functions your application can use to edit movies using a controller component.
Inside Macintosh defines functions you can use to set the duration of a movie controller to an arbitrary value, or to read the time value represented by the slider in a movie controller.
Customizing Event ProcessingInside Macintosh defines functions your application can use to customize event processing by the movie controller. These functions return flags to your application indicating whether or not they handled an event, allowing your application to process events when necessary.
Application-Defined FunctionInside Macintosh defines the function your application can use to establish an action filter function, as discussed in the section Customizing Movie Controllers above.
ConstantsInside Macintosh lists the constants available to you for use with movie controller components. These constants primarily serve to give meaningful names to numeric data. Applications developers can use these constants as flags when communicating with movie controller components. If you are creating a new component, you will need to know the values being passed by these constants.
Data TypesInside Macintosh defines the two data types associated with movie controller components: mcAction and MCFlags.
Result CodesInside Macintosh defines the result codes that are likely to be returned by movie controller component functions in the event of an error.